﻿<%@ Page Title="" Language="C#" MasterPageFile="~/FrontEnd.master" AutoEventWireup="true" CodeFile="~/Code/all_incidents.aspx.cs" Inherits="all_incidents" %>

<%@ Register assembly="GMaps" namespace="Subgurim.Controles" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cp_Page_Heading" Runat="Server">
Please find below all previous and current Incidents
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cp_Major_Content" Runat="Server">
    <cc1:GMap ID="GMap" runat="server" Width="100%" />
    <br />
    <br />
<br />
Below is the Current Active Incidents:
    <asp:GridView ID="current_Active_GV" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
        DataSourceID="current_active" ForeColor="#333333" GridLines="None" Width="100%" OnDataBound="current_active_databound">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="Status" HeaderText="Status" 
                SortExpression="Status" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:BoundField DataField="Type" HeaderText="Type" 
                SortExpression="Type" />
            <asp:BoundField DataField="Landmark" HeaderText="Landmark" 
                SortExpression="Landmark" />
            <asp:BoundField DataField="City" HeaderText="City" 
                SortExpression="City" />
            <asp:BoundField DataField="State_Name" HeaderText="State_Name" 
                SortExpression="State_Name" />
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    <br />
    <br />
Below are Previously Resolved Incidents:<asp:GridView ID="resolved_GV" 
        runat="server" AllowPaging="True" AllowSorting="True" 
        AutoGenerateColumns="False" CellPadding="4" DataSourceID="current_resolved" OnDataBound="resolved_databound" 
        ForeColor="#333333" GridLines="None" Width="100%">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="Status" HeaderText="Status" 
                SortExpression="Status" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:BoundField DataField="Type" HeaderText="Type" 
                SortExpression="Type" />
            <asp:BoundField DataField="Landmark" HeaderText="Landmark" 
                SortExpression="Landmark" />
            <asp:BoundField DataField="City" HeaderText="City" 
                SortExpression="City" />
            <asp:BoundField DataField="State_Name" HeaderText="State_Name" 
                SortExpression="State_Name" />
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    <asp:AccessDataSource ID="current_resolved" runat="server" 
        DataFile="~/App_Data/Database.accdb" 
        
        SelectCommand="SELECT Incidents.Status, Incidents.Description, Incidents.Type, Incidents.Landmark, Incidents.City, State.State_Name FROM (Incidents INNER JOIN State ON Incidents.State = State.State_ID) WHERE (Incidents.Status = 'Resolved')">
    </asp:AccessDataSource>
&nbsp;<asp:AccessDataSource ID="current_active" runat="server" 
        DataFile="~/App_Data/Database.accdb" 
        
        SelectCommand="SELECT Incidents.Status, Incidents.Description, Incidents.Type, Incidents.Landmark, Incidents.City, State.State_Name FROM (Incidents INNER JOIN State ON Incidents.State = State.State_ID) WHERE (Incidents.Status = 'Active')">
    </asp:AccessDataSource>
</asp:Content>

